#pragma once
#include "stdafx.h"


class Particle
{
public:
	Particle(const Vector3& start_position, const Vector3& direction, float lifetime)
	: m_position(start_position), m_direction(direction), m_lifetime(lifetime), m_current_lifetime(lifetime)
	{};
	virtual ~Particle(void) {};

	virtual void Update(float deltatime){
		m_position += (m_direction * deltatime);
		//m_current_lifetime = std::min(m_current_lifetime + deltatime, m_lifetime);
		
		m_current_lifetime -= deltatime;

		if (m_current_lifetime == m_lifetime){
			//TODO
		}
	}
	const Vector3& GetPosition() const { return m_position; };
	const float& GetLifetime() const { return m_current_lifetime; };

protected:
	Vector3 m_position;
	Vector3 m_direction;
	float m_lifetime;
	float m_current_lifetime;
};

